type: object
properties:
  locations:
    type: array
    default: []
    x-examples:
      - []
    items:
      type: object
      required:
        - location
      properties:
        location:
          type: string
          description: The location for which `whitelist` and `users` are specified (in the nginx config, the `root` is replaced with `/`.
          x-examples: ["/", "root", "/test"]
        whitelist:
          type: array
          description: A list of IP addresses and subnets for which no login/password is required for authorization.
          minItems: 1
          x-examples:
            - - 127.0.0.111
              - 127.0.0.111
          items:
            type: string
        users:
          type: object
          description: |
            A list of users in the `username: "password"` format.
          x-examples:
            - admin: R0BkCCBLbnLC
              user: foobar
          additionalProperties:
            type: string
    description: |
      A set of locations to restrict access using basic auth. If empty, `/` location is added with autogenerated password.

      Use kubectl to see autogenerated location:

      ```shell
      kubectl -n d8-system exec deploy/deckhouse -- deckhouse-controller module values basic-auth -o json | jq '.basicAuth.internal.locations'
      ```

      Delete secret to re-generate default location:

      ```shell
      kubectl -n kube-basic-auth delete secret/htpasswd
      ```

  highAvailability:
    type: boolean
    x-examples: [true, false]
    description: |
      Manually enable the high availability mode.

      By default, Deckhouse automatically decides whether to enable the HA mode. Click [here](../../deckhouse-configure-global.html#parameters) to learn more about the HA mode for modules.
  nodeSelector:
    type: object
    additionalProperties:
      type: string
    x-kubernetes-preserve-unknown-fields: true
    x-examples:
      - disktype: ssd
    description: |
      The same as in the pods' `spec.nodeSelector` parameter in Kubernetes.

      If the parameter is omitted or `false`, it will be determined [automatically](https://deckhouse.io/documentation/v1/#advanced-scheduling).
  tolerations:
    type: array
    items:
      type: object
      properties:
        effect:
          type: string
        key:
          type: string
        operator:
          type: string
        tolerationSeconds:
          type: integer
          format: int64
        value:
          type: string
    x-examples:
      - - key: "key1"
          operator: "Equal"
          value: "value1"
          effect: "NoSchedule"
    description: |
      The same as in the pods' `spec.tolerations` parameter in Kubernetes;

      If the parameter is omitted or `false`, it will be determined [automatically](https://deckhouse.io/documentation/v1/#advanced-scheduling).
